package com.ibm.cps.message.validation;

import com.fasterxml.jackson.databind.node.ObjectNode;
import com.ibm.cps.message.MessageFields;
import com.ibm.util.exception.CPSException;

public class PublishProcessorValidator extends IProcessorValidator {

	@Override
	public void validatePostMessage(ObjectNode element) throws CPSException {

		ValidatorUtil.commonProcess(element);

		String[] strFields = { MessageFields.TYPE,
		/* MessageFields.PUBLISHER_TYPE, */MessageFields.TOPICNAME };
		String[] arrFields = { MessageFields.PARENTPROCESSORS };
		ValidatorUtil.validateAllTypeFields(element, strFields, arrFields,
				null, null);

		/*
		 * String publishType = parser.getStringField(element,
		 * MessageFields.PUBLISHER_TYPE); switch (publishType) { case
		 * PublishType.MESSAGE_QUEUE: // these information will need in the
		 * future // String[] sever = { MessageFields.SERVER_IP, //
		 * MessageFields.PROTOCOL_TYPE }; // String[] intInfo = {
		 * MessageFields.PORT }; // util.validateStringFields(parser, element,
		 * sever); // util.validateIntFields(parser, element, intInfo);
		 * 
		 * break; case PublishType.E_MAIL: String[] emailAddress = { "address"
		 * }; util.validateStringFields(parser, element, emailAddress); break;
		 * case PublishType.IMMEDIATE_MESSAGE: String[] host = { "address" };
		 * util.validateStringFields(parser, element, host); break; default:
		 * break; }
		 */
	}

}
